import React, {Component} from 'react';
import { Switch, Route, Redirect } from 'react-router-dom';
import GlobalNav from '@/components/base/GlobalNav';
// 三类导航菜单
import Navv from '@/components/kind/child/Navv';
import MeatNav from '@/components/kind/child/MeatNav';
import VegNav from '@/components/kind/child/VegNav';
import Relevant from '@/components/kind/child/Relevant';
import Newest from '@/components/kind/child/Newest';
import Interfix from '@/components/kind/child/Interfix';
import Score from '@/components/kind/child/Score';
import Footer from '@/components/base/Footer';
import './Kind.scss'
class Com extends Component {
  constructor (props) {
    super (props)
    this.state={}
  }

  render () {
    return (
      <div className="container">
          <div className="header">
          <GlobalNav {...this.props}/>
          </div>
          <div className="section">
          {/*  左边导航 */}
          <Switch>
            <Route path = "/fkind/navv" component = { Navv } />
            <Route path = "/fkind/meat" component = { MeatNav } />
            <Route path = "/fkind/veg" component = { VegNav } />
            <Redirect from = "/fkind" to = "/fkind/navv" />
          </Switch>
          {/* <Navv {...this.props}/> */}
            {/* 主列表 */}
            < Score {...this.props}/>
            <div className="Kind_Rightsidebar">
            {/* 相关菜谱 */}
                <Relevant {...this.props}/>
                {/* 最新发布菜谱 */}
              <Newest {...this.props}/>
              {/* 家常菜相关菜单 */}
                <Interfix />
                {/* 二维码 */}
                <div className="Classify_erweima">
                  <img src={require('./../../img/xia.png') }alt=""/>
                </div>
            </div>
          </div>
          <div className="foot">
          <Footer />
        </div>
      </div>
    )
  }
}
export default Com;